package app.baseinfomanage.organmanage.dao;

import app.base.systemmanage.systemrolesmanage.model.SysRoles;
import app.base.systemmanage.systemrolesmanage.model.SysRolesKey;
import app.baseinfomanage.organmanage.model.OrganInfo;
import app.baseinfomanage.organmanage.model.OrganInfoExample;
import app.baseinfomanage.organmanage.model.OrganInfoKey;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class OrganInfoDAOImpl extends SqlMapClientDaoSupport implements OrganInfoDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public OrganInfoDAOImpl() {
        super();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int countByExample(OrganInfoExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("ORGAN_INFO.ibatorgenerated_countByExample", example);
        return count.intValue();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int deleteByExample(OrganInfoExample example) {
        int rows = getSqlMapClientTemplate().delete("ORGAN_INFO.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int deleteByPrimaryKey(OrganInfoKey key) {
        int rows = getSqlMapClientTemplate().delete("ORGAN_INFO.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public void insert(OrganInfo record) {
        getSqlMapClientTemplate().insert("ORGAN_INFO.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public void insertSelective(OrganInfo record) {
        getSqlMapClientTemplate().insert("ORGAN_INFO.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public List selectByExample(OrganInfoExample example) {
        List list = getSqlMapClientTemplate().queryForList("ORGAN_INFO.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public OrganInfo selectByPrimaryKey(OrganInfoKey key) {
        OrganInfo record = (OrganInfo) getSqlMapClientTemplate().queryForObject("ORGAN_INFO.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int updateByExampleSelective(OrganInfo record, OrganInfoExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("ORGAN_INFO.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int updateByExample(OrganInfo record, OrganInfoExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("ORGAN_INFO.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int updateByPrimaryKeySelective(OrganInfo record) {
        int rows = getSqlMapClientTemplate().update("ORGAN_INFO.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    public int updateByPrimaryKey(OrganInfo record) {
        int rows = getSqlMapClientTemplate().update("ORGAN_INFO.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table ORGAN_INFO
     *
     * @ibatorgenerated Wed Jul 01 10:12:09 CST 2009
     */
    private static class UpdateByExampleParms extends OrganInfoExample {
        private Object record;

        public UpdateByExampleParms(Object record, OrganInfoExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
    
    //
    public void insert_0001(OrganInfo record) {
        getSqlMapClientTemplate().insert("ORGAN_INFO.insert_0001", record);
    }
    
    public int update_0001(OrganInfo record) {
        int rows = getSqlMapClientTemplate().update("ORGAN_INFO.update_0001", record);
        return rows;
    }
    
    public int delete_0001(OrganInfoKey key) {
        int rows = getSqlMapClientTemplate().delete("ORGAN_INFO.delete_0001", key);
        return rows;
    }
    
    public List select_0001(Map<String, Object> map) {
        List list = getSqlMapClientTemplate().queryForList("ORGAN_INFO.select_0001", map);
        return list;
    }
}